{% extends "myinfo.html" %} 
{%block menu_body%}
{%for lesson in lessonlist%}
<div class="odbox" style="margin-left:20px">
	<div>
	{%ifequal identity 1%}
		<img src="/media/{{lesson.lessons.users.src}}" style="float:left;width: 100px;	height: 100px;margin-top:20px">
	{%endifequal%}
	{%ifequal identity 0%}
		<img src="/media/{{lesson.lessons.users.src}}" style="float:left;width: 100px;	height: 100px;margin-top:20px">
	{%endifequal%}		
	</div>
	<div style="float:left;width:860px;background-color:#FFF;margin-top:20px">
		<div style="background-color:#BBB">
			<span style=""><b>姓名：{{lesson.lessons.users.nickname}}</b></span>
			<span style="position: absolute;left:500px"><b>课程名：{{lesson.title}}</b></span>
			{%ifequal identity 0%}
				{%ifequal lesson.status 0%}
					<span style="position: absolute;left: 850px;"><b>状态：正在预约</b>
				{%endifequal%}	{%ifequal lesson.status 1%}
					<span style="position: absolute;left: 850px;"><b>状态：接受预约</b>
					<!-- <input type="button" value="完成预约" id="{{lesson.id}}" onclick="finishOrder(this)"> -->
					<button id="{{lesson.id}}" onclick="finishOrder(this)">状态：完成预约</button>
					</span>
				{%endifequal%}
				{%ifequal lesson.status 2%}
					<span style="position: absolute;left: 850px;"><b>状态：已完成</b>
				{%endifequal%}
			{%endifequal%}
			{%ifequal identity 1%}
				{%ifequal lesson.status 0%}
					<span style="position: absolute;left: 850px;"><b>状态：已接受</b>
				{%endifequal%}
				{%ifequal lesson.status 1%}
					<span style="position: absolute;left: 850px;"><b>状态：已完成</b></span>
				{%endifequal%}
			{%endifequal%}
		</div>
		<div style="border: 1px solid black;min-height:80px;">{{lesson.request}}</div>
	</div>
</div>	
{%endfor%}
{% endblock %}